# -*- encoding:ascii -*-
from mako import runtime, filters, cache
UNDEFINED = runtime.UNDEFINED
__M_dict_builtin = dict
__M_locals_builtin = locals
_magic_number = 8
_modified_time = 1357474987.983
_enable_loop = True
_template_filename = 'resources/Abschnitt.html'
_template_uri = 'resources/Abschnitt.html'
_source_encoding = 'ascii'
_exports = []


def render_body(context,**pageargs):
    __M_caller = context.caller_stack._push_frame()
    try:
        __M_locals = __M_dict_builtin(pageargs=pageargs)
        currentThemaBezeichner = context.get('currentThemaBezeichner', UNDEFINED)
        LerneinheitNummer = context.get('LerneinheitNummer', UNDEFINED)
        themenList = context.get('themenList', UNDEFINED)
        abschnitt = context.get('abschnitt', UNDEFINED)
        __M_writer = context.writer()
        # SOURCE LINE 1
        __M_writer(u'\r\n    \r\n\r\n<h2>Abschnitt Informationen</h2>\r\n\r\n   \r\n        <form action="/Lerneinheiten/open/save" method="post" accept-charset="utf-8">\r\n       <input type="hidden" name="LerneinheitNummer" value="')
        # SOURCE LINE 8
        __M_writer(unicode(LerneinheitNummer))
        __M_writer(u'" />\r\n        <p>\r\n            <label>Bezeichner</label>\r\n\r\n')
        # SOURCE LINE 12
        if abschnitt == None or abschnitt.Bezeichner == None:
            # SOURCE LINE 13
            __M_writer(u'                <input type="text" name="Bezeichner" value="" />\r\n')
            # SOURCE LINE 14
        else:
            # SOURCE LINE 15
            __M_writer(u'                <input type="text" name="Bezeichner" value="')
            __M_writer(unicode(abschnitt.Bezeichner))
            __M_writer(u'"/>\r\n')
        # SOURCE LINE 17
        __M_writer(u'\r\n            \r\n        </p>\r\n\r\n        <p>    \r\n            <label>Thema</label>\r\n            <select name="Thema" id="decision">\r\n')
        # SOURCE LINE 24
        for a in themenList:
            # SOURCE LINE 25
            if a.Bezeichner == currentThemaBezeichner:
                # SOURCE LINE 26
                __M_writer(u'                        <option selected="selected"> ')
                __M_writer(unicode(a.Bezeichner))
                __M_writer(u'  </option>\r\n')
                # SOURCE LINE 27
            else:
                # SOURCE LINE 28
                __M_writer(u'                        <option> ')
                __M_writer(unicode(a.Bezeichner))
                __M_writer(u'  </option>\r\n')
        # SOURCE LINE 31
        __M_writer(u'            </select>\r\n        </p>\r\n\r\n     \r\n\r\n        <p>\r\n            <label class="the-fix">\r\n            Beschreibung\r\n')
        # SOURCE LINE 39
        if abschnitt == None or abschnitt.Beschreibung == None:
            # SOURCE LINE 40
            __M_writer(u'                <textarea name="Beschreibung" rows="10"  > </textarea>\r\n')
            # SOURCE LINE 41
        else:
            # SOURCE LINE 42
            __M_writer(u'                <textarea name="Beschreibung" rows="10"  >')
            __M_writer(unicode(abschnitt.Beschreibung))
            __M_writer(u' </textarea>\r\n')
        # SOURCE LINE 44
        __M_writer(u'            </label>\r\n        </p>\r\n   \r\n   \r\n\r\n    <button type="submit">Save</button>\r\n    \r\n\r\n    </form>\r\n\r\n\r\n\r\n')
        # SOURCE LINE 56
        if abschnitt != None:
            # SOURCE LINE 57
            __M_writer(u'\r\n<p class="teiler" ></p>\r\n<h2>Frage Erstellen</h2>\r\n    <a href="/Fragen/open?AbschnittBezeichner=')
            # SOURCE LINE 60
            __M_writer(unicode(abschnitt.Bezeichner))
            __M_writer(u'&amp;LerneinheitNummer=')
            __M_writer(unicode(LerneinheitNummer))
            __M_writer(u'">Create</a>\r\n\r\n<h2>Fragen Liste</h2>\r\n    <ul>\r\n')
            # SOURCE LINE 64
            for a in abschnitt.Fragen:
                # SOURCE LINE 65
                __M_writer(u'    <li>\r\n        <a href="/Fragen/open?FrageText=')
                # SOURCE LINE 66
                __M_writer(unicode(a.Text))
                __M_writer(u'&amp;AbschnittBezeichner=')
                __M_writer(unicode(abschnitt.Bezeichner))
                __M_writer(u'&amp;LerneinheitNummer=')
                __M_writer(unicode(LerneinheitNummer))
                __M_writer(u'">')
                __M_writer(unicode(a.Text))
                __M_writer(u'</a>\r\n        <a href="/Fragen/remove?FrageText=')
                # SOURCE LINE 67
                __M_writer(unicode(a.Text))
                __M_writer(u'&amp;AbschnittBezeichner=')
                __M_writer(unicode(abschnitt.Bezeichner))
                __M_writer(u'&amp;LerneinheitNummer=')
                __M_writer(unicode(LerneinheitNummer))
                __M_writer(u'">Remove</a>\r\n    </li>\r\n')
            # SOURCE LINE 70
            __M_writer(u'    </ul>\r\n\r\n<p class="teiler" ></p>\r\n')
        return ''
    finally:
        context.caller_stack._pop_frame()


